package summer.codegenerator.model.enumeration;

import com.alibaba.fastjson.annotation.JSONType;

import summer.codegenerator.common.annotation.ExportEnum;
import summer.codegenerator.model.base.EnumFastJSONDeserializer;
import summer.codegenerator.model.base.EnumFastJSONSerializer;
import summer.codegenerator.model.base.EnumIndexable;

/**
 * 
 * 
 * @author 蒋振
 * @since 2019年6月26日 上午9:02:55
 */
@ExportEnum
@JSONType(serializeEnumAsJavaBean = true, serializer = EnumFastJSONSerializer.class, deserializer = EnumFastJSONDeserializer.class)
public enum NodeType implements EnumIndexable {
	COMPANY(1, "公司"), AREA(2, "区域"), EQUIPTMENT(3, "设备");

	private Integer index;

	private String text;

	private NodeType(Integer index, String text) {
		this.index = index;
		this.text = text;
	}

	@Override
	public Integer getIndex() {
		return index;
	}

	public String getText() {
		return text;
	}
}
